<script>
	import { startAlarmService, stopAlarmService } from './utils/alarm-service.js';
	
	export default {
		onLaunch: function() {
			console.log('App Launch');
			// 启动闹钟后台服务
			startAlarmService();
		},
		onShow: function() {
			console.log('App Show');
			// 确保闹钟服务在应用恢复时启动
			startAlarmService();
		},
		onHide: function() {
			console.log('App Hide');
			// 应用进入后台时不停止服务，保持闹钟功能
		},
		onUnload: function() {
			console.log('App Unload');
			// 应用卸载时停止服务
			stopAlarmService();
		}
	}
</script>

<style>
	/*每个页面公共css */
	page {
		background-color: #f5f5f5;
		font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
	}
</style>
